@extends('admin.layouts.dashboard')
@section('page_heading','Tables')

@section('section')
<div class="row">
	<div class="col-sm-12">
		@section ('cotable_panel_title','Coloured Table')
		@section ('cotable_panel_body')
		<table class="table table-bordered">
			<thead>
				<tr>
					<th>文章id</th>
					<th>标题</th>
					<th>作者</th>
					<th>发行时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				@foreach($articels as $articel)
				<tr class="success">
					<td>{{ $articel->id }}</td>
					<td>{{ $articel->title }}</td>
					<td>{{ $articel->author }}</td>
					<td>{{ date('Y-m-d H:i:s',$articel->add_time)}}</td>
					<td>
						<a href="{{ route('admin.articel.edit' , $articel->id) }}">详情</a>
						
						<a href="{{route('admin.articel.show',$articel->id)}}">@if($articel->is_recommend == 0)设置推荐@else取消推荐@endif</a>
						
						@include('admin.delete',array('data'=>$articel,'name' => 'articel'))
					</td>
				</tr>
				@endforeach
			</tbody>
		</table>	
		@endsection
		@include('admin.widgets.panel', array('header'=>true, 'as'=>'cotable'))
	</div>
</div>
<div>
	{{ $articels->render() }}
</div>
@stop